// 统计字符串种单词的数量
package main

import (
	"fmt"
	"strings"
)

func main() {
	s := "how do you do"
	s1 := strings.Split(s, " ")
	s2 := make(map[string]int, len(s1))
	for _, v := range s1 {
		if _, ok := s2[v]; !ok {
			s2[v] = 1
		} else {
			s2[v]++
		}
	}
	for i, v := range s2 {
		fmt.Println(i, v)
	}

}
